.class Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;
.super Ljava/lang/Object;
.source "ReginaLauncher.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/ReginaLauncher;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "CacheWorkspaceThumbRunnable"
.end annotation


# instance fields
.field private mIsFirstLaunching:Z

.field private mWsIndex:I

.field final synthetic this$0:Lcom/nemustech/regina/ReginaLauncher;


# direct methods
.method public constructor <init>(Lcom/nemustech/regina/ReginaLauncher;Z)V
    .locals 1
    .parameter
    .parameter "isFirstLaunching"

    .prologue
    .line 2700
    iput-object p1, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2701
    const/4 v0, 0x0

    iput v0, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mWsIndex:I

    .line 2702
    iput-boolean p2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mIsFirstLaunching:Z

    .line 2703
    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x0

    .line 2706
    const-string v2, "ReginaLauncher"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "CacheWorkspaceThumbRunnable start!! index : "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mWsIndex:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ", is first? "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-boolean v4, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mIsFirstLaunching:Z

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {}, Lcom/nemustech/regina/ReginaLauncher;->access$1100()Z

    move-result v4

    invoke-static {v2, v3, v4}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 2707
    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2}, Lcom/nemustech/regina/ReginaLauncher;->access$800(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/regina/ElementLocator;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceCount()I

    move-result v1

    .line 2708
    .local v1, workspaceCount:I
    iget v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mWsIndex:I

    if-ge v2, v1, :cond_2

    .line 2709
    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2}, Lcom/nemustech/regina/ReginaLauncher;->access$800(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/regina/ElementLocator;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v3

    iget v4, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mWsIndex:I

    invoke-virtual {v2, v3, v4}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v0

    .line 2710
    .local v0, workspace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspace;->getBackgroundPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncher;->access$500(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/nemustech/tiffany/world/TFPanel;->forceImageLoading(Lcom/nemustech/tiffany/world/TFWorld;)V

    .line 2711
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspace;->getElementPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncher;->access$500(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/nemustech/tiffany/world/TFPanel;->forceImageLoading(Lcom/nemustech/tiffany/world/TFWorld;)V

    .line 2712
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspace;->getBackgroundThumbPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncher;->access$500(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/nemustech/tiffany/world/TFPanel;->forceImageLoading(Lcom/nemustech/tiffany/world/TFWorld;)V

    .line 2713
    iget-boolean v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mIsFirstLaunching:Z

    if-eqz v2, :cond_0

    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspace;->getElementPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v2

    invoke-virtual {v2, v5, v6, v6}, Lcom/nemustech/tiffany/world/TFPanel;->setImageResource(ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)Z

    .line 2714
    :cond_0
    iget v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mWsIndex:I

    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mWsIndex:I

    .line 2715
    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2}, Lcom/nemustech/regina/ReginaLauncher;->access$1400(Lcom/nemustech/regina/ReginaLauncher;)Landroid/os/Handler;

    move-result-object v2

    const-wide/16 v3, 0x64

    invoke-virtual {v2, p0, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 2721
    .end local v0           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_1
    :goto_0
    return-void

    .line 2716
    :cond_2
    iget-boolean v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->mIsFirstLaunching:Z

    if-eqz v2, :cond_1

    .line 2717
    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, v5}, Lcom/nemustech/regina/ReginaLauncher;->access$1502(Lcom/nemustech/regina/ReginaLauncher;Z)Z

    .line 2718
    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v2}, Lcom/nemustech/regina/ReginaLauncher;->dismissProgressDialog()V

    .line 2719
    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2}, Lcom/nemustech/regina/ReginaLauncher;->access$1300(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/regina/AppInfoManager;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nemustech/regina/AppInfoManager;->isAppInfoLoaded()Z

    move-result v2

    if-nez v2, :cond_1

    iget-object v2, p0, Lcom/nemustech/regina/ReginaLauncher$CacheWorkspaceThumbRunnable;->this$0:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2}, Lcom/nemustech/regina/ReginaLauncher;->access$1300(Lcom/nemustech/regina/ReginaLauncher;)Lcom/nemustech/regina/AppInfoManager;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nemustech/regina/AppInfoManager;->startAppLoader()V

    goto :goto_0
.end method
